home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 7 / FM Towns Free Software Collection 7.iso / data / nyan_e2 / nyane2_h.plp < prev    next >
Text File  |  1993-11-30  |  9KB  |  363 lines

  1. /**********   発言タイトル一覧の作成  ~途中経過表示版~  v1.04a用  **********/
  2. var count[4];
  3. var item[92];
  4. %MesDat   tmpdir|{\_TMP.DAT};
  5.  
  6. %setstar{[Flag]
  7.     case(Flag={Yes} && (type={Forum} || type={Patio}) && UnReadL!=0,{Yes},{
  8.         %last @nolmemo(2)-2;
  9.         case(last>UnReadL,
  10.         {Yes}, {linenum:=last-UnReadL+1;
  11.         },{No},{linenum:=2;
  12.         });
  13.         mclear(3);
  14.         mmove(2,1,linenum-1,3);
  15.         madd(3,@getchar(@memo(2,linenum,1),1,8));
  16.         madd(3,{*});
  17.         madd(3,@getchar(@memo(2,linenum,1),10));
  18.         mmove(2,linenum+1,@nolmemo(2),3);
  19.         mclear(2);
  20.         mcopy(3,2);
  21.         mclear(3);
  22.     });
  23.     mwrite(MesDat,2);
  24. };
  25.  
  26. %date{[DATE]
  27.     %Y    @getchar(DATE, 1,2);
  28.     %M    @getchar(DATE, 4,2);
  29.     %D    @getchar(DATE, 7,2);
  30.     %HH    @getchar(DATE,10,2);
  31.     %MM    @getchar(DATE,13,2);
  32.     case(@im(M|D)+0==0,
  33.     {Yes}, {im({0000000000});
  34.     },{No},{im(Y|M|D|HH|MM);
  35.     });
  36. };
  37.  
  38. %setline {
  39.     case(type,
  40.     {BUL},{
  41.         var OLDdate[10];
  42.         var CURdate[10];
  43.         loop({
  44.             %wkln1    @fread(19,{/});
  45.             case(@getchar(wkln1,10,5)*@getchar(wkln1,20,2)>0,
  46.             {Yes},{
  47.                 CURdate:=@date({00/}|@getchar(wkln1,17,5)|{ 00:00});
  48.                     case(OLDdate <= CURdate,
  49.                     {Yes},{
  50.                 item:=@ftell|{ }|@getchar(wkln1,7,80);
  51.                 madd(2,item);
  52.                 footnote(@getchar(@head(item,{\n}),10,78));
  53.                 OLDdate:=CURdate;
  54.                 });
  55.             });
  56.             im(wkln1<>{})
  57.         });
  58.     },{HP},{
  59.         case(First=1 && Count=0,
  60.         {Yes},{
  61.             loop({
  62.             %wkln1 @fread(9,{/});
  63.             case(85<@getchar(wkln1,7,2) && 
  64.                         @getchar(wkln1,18,1)={:},
  65.             {Yes},{
  66.                 case(wkln1<>{},{Yes},{
  67.                 madd(2,    @ftell|{  }|@getchar(wkln1,1,3)|{ }
  68.                     |@getchar(wkln1,7,14)|{         }
  69.                     |@getchar(wkln1,37,50));
  70.                 });
  71.                 footnote(@getchar(@head(wkln1,{\n}),1,69));
  72.             });
  73.             im(wkln1<>{})
  74.             });
  75.         },{No},{
  76.             loop({
  77.             %wkln1 @fread(9,{/});
  78.             case(@getchar(wkln1,1,3)>=First,
  79.             {Yes},{
  80.                 case(85<@getchar(wkln1,7,2) && 
  81.                         @getchar(wkln1,18,1)={:},
  82.                 {Yes},{
  83.                 count:=count+1;
  84.                 madd(2,@ftell|{  }|@getchar(wkln1,1,3)|{ }
  85.                     |@getchar(wkln1,7,14)|{         }
  86.                     |@getchar(wkln1,37,50));
  87.                 footnote(@getchar(@head(wkln1,{\n}),1,69));
  88.                 });
  89.             },{No},{
  90.                 footnote({ article skip. number : }
  91.                     |@getchar(wkln1,1,3));
  92.             });
  93.             im(wkln1<>{} && (Count > count || Count = 0))
  94.             });
  95.             %wkln1 @fread(9,{/});
  96.         });
  97.     },{Mail},{
  98.         loop({
  99.             %wkln1 @fread(35,{/});
  100.             item:=@ftell;
  101.             %wkln2 @fread;
  102.             case(@getchar(wkln1,41,1)={:} && 
  103.                     @getchar(wkln2,5,4)={題名},{Yes},{
  104.                 item:=item|{ }|@getchar(wkln1,5,17)
  105.                     |@getchar(wkln1,23,8)
  106.                     |@getchar(wkln1,32,6)|{ }
  107.                     |@getchar(wkln2,11,68);
  108.                 madd(2,item);
  109.                 footnote(@getchar(@head(item,{\n}),10,77));
  110.             });
  111.             im(wkln1<>{})
  112.         });
  113.     },{Prof},{
  114.         loop({
  115.             %wkln1    @fread(78,{-});
  116.             %wkln2    @fread;
  117.             item:=@ftell;
  118.             case(@getchar(wkln1,20,15)={---------------} &&
  119.                  @getchar(wkln2,19,4)={PROF},{Yes},{
  120.                 madd(2,item|{ }|@getchar(wkln2,1,18)|{(}|
  121.                     @getchar(wkln2,24,8)|{)\n});
  122.                 footnote(@head(wkln2,{\n}));
  123.             });
  124.             im(wkln1<>{})
  125.         });
  126.     });
  127. };
  128. madd(2,{99999999 ★表示したいメッセージを左ダブルクリック}|
  129.         {(又はカーソル移動+PF3)してね★\n});
  130. mclear(3);
  131. linenum:=0;
  132.  
  133. %MesChk{
  134.     var Line1[500];
  135.     var Line2[500];
  136.     mclear(4);
  137.     MesType:={};
  138.     Line2:=@fread;
  139.     %MesChk2{[n]
  140.         var rc[3];
  141.         case(@getchar(Line1,1,n) * @getchar(Line1,n+2,n) > 0,{Yes},{
  142.             case(    @getchar(Line2, 1,1)={(} &&
  143.                 @getchar(Line2, 4,1)={)} &&
  144.                 @getchar(Line2,10,1)={/} &&
  145.                 @getchar(Line2,13,1)={/} &&
  146.                 @getchar(Line2,16,1)={ } &&
  147.                 @getchar(Line2,19,1)={:},
  148.             {Yes},{ 
  149.                 rc:={Yes};
  150.             });
  151.         });
  152.         im(rc);
  153.     };
  154.     loop({
  155.         Line1:=Line2;
  156.         Line2:=@fread;
  157.         case(@getchar(Line1,4,1)={/},
  158.         {Yes},{
  159.             case(@MesChk2(3),{Yes},{MesType:={OLD}});
  160.         },{No},{
  161.             case(@getchar(Line1,6,1)={/},{Yes},{
  162.                 case(@MesChk2(5),{Yes},{MesType:={NEW}});
  163.             });
  164.         });
  165.         im(MesType={} && Line1<>{});
  166.     });
  167.     fclose;
  168.     fopen(fname);
  169. };
  170.  
  171. fopen(fname);
  172. footnote({ ログの取り出しをしています.ちょっと,お待ちを!});
  173. count:=0;
  174. case(type<>{Forum} && type<>{Patio},
  175. {Yes},{
  176.     setline;
  177. },{No},{
  178.     MesChk;
  179.     case(MesType,
  180.     {OLD},{
  181.         case(First=1 && Count=0,
  182.         {Yes},{
  183.             loop({
  184.             %wkln1 @fread(4,{/});
  185.             item:=@ftell;
  186.             %wkln2 @fread;
  187.             case(85<@getchar(wkln2,8,2) && 
  188.                         @getchar(wkln2,19,1)={:},
  189.             {Yes},{
  190.                 case(@getchar(wkln2,27,2),
  191.                 {へ},{
  192.                 madd(2,item|{ 00}|@getchar(wkln1,1,3)|{ 00}
  193.                 |@getchar(wkln2,24,3)
  194.                 |@getchar(wkln1,20,17)
  195.                 |@getchar(wkln1,38,80))
  196.                 },,{
  197.                 case(wkln2<>{},{Yes},{
  198.                     madd(2,item|{ 00}|@getchar(wkln1,1,3)
  199.                     |{      }|@getchar(wkln1,20,17)
  200.                     |@getchar(wkln1,38,80))
  201.                 });
  202.                 });
  203.                 footnote(@getchar(@head(wkln1,{\n}),1,69));
  204.             });
  205.             im(wkln1<>{})
  206.             });
  207.         },{No},{
  208.             loop({
  209.             %wkln1 @fread(4,{/});
  210.             case(@getchar(wkln1,1,3)>=First,
  211.             {Yes},{
  212.                 item:=@ftell;
  213.                 %wkln2 @fread;
  214.                 case(85<@getchar(wkln2,8,2) && 
  215.                         @getchar(wkln2,19,1)={:},
  216.                 {Yes},{
  217.                 count:=count+1;
  218.                 case(@getchar(wkln2,27,2),
  219.                 {へ},{
  220.                     madd(2,item|{ 00}|@getchar(wkln1,1,3)|{ 00}
  221.                     |@getchar(wkln2,24,3)
  222.                     |@getchar(wkln1,20,17)
  223.                     |@getchar(wkln1,38,80))
  224.                 },,{
  225.                      madd(2,item|{ 00}|@getchar(wkln1,1,3)|
  226.                     {      }|@getchar(wkln1,20,17)
  227.                     |@getchar(wkln1,38,80))
  228.                     });
  229.                     footnote(@getchar(@head(wkln1,{\n}),1,69));
  230.                 im({No});
  231.                 },{No},{
  232.                     im(wkln1<>{});
  233.                 });
  234.             },{No},{
  235.                 footnote({ article skip. number : }
  236.                     |@getchar(wkln1,1,3));
  237.                 im(wkln1<>{});
  238.             });
  239.             });
  240.             loop({
  241.                 %wkln1 @fread(4,{/});
  242.                 item:=@ftell;
  243.                 %wkln2 @fread;
  244.                 case(85<@getchar(wkln2,8,2) && 
  245.                         @getchar(wkln2,19,1)={:},
  246.                 {Yes},{
  247.                 count:=count+1;
  248.                 case(@getchar(wkln2,27,2),
  249.                 {へ},{
  250.                     madd(2,item|{ 00}|@getchar(wkln1,1,3)|{ 00}
  251.                     |@getchar(wkln2,24,3)
  252.                     |@getchar(wkln1,20,17)
  253.                     |@getchar(wkln1,38,80))
  254.                 },,{
  255.                      madd(2,item|{ 00}|@getchar(wkln1,1,3)|
  256.                     {      }|@getchar(wkln1,20,17)
  257.                     |@getchar(wkln1,38,80))
  258.                     });
  259.                     footnote(@getchar(@head(wkln1,{\n}),1,69));
  260.                 });
  261.                 im(wkln1<>{} && (Count>count || Count=0))
  262.             });
  263.             %wkln1 @fread(4,{/});
  264.         });
  265.         },{NEW},{
  266.         case(First=1 && Count=0,
  267.         {Yes},{
  268.             loop({
  269.             %wkln1 @fread(6,{/});
  270.             item:=@ftell;
  271.             %wkln2 @fread;
  272.             case(85<@getchar(wkln2,8,2) && 
  273.                         @getchar(wkln2,19,1)={:},
  274.             {Yes},{
  275.                 case(@getchar(wkln2,29,2),
  276.                 {へ},{
  277.                 madd(2,item|{ }|@getchar(wkln1,1,5)|{ }
  278.                     |@getchar(wkln2,24,5)
  279.                     |@getchar(wkln1,22,17)
  280.                     |@getchar(wkln1,39,80))
  281.                 },,{
  282.                 case(wkln2<>{},{Yes},{
  283.                     madd(2,item|{ }|@getchar(wkln1,1,5)
  284.                     |{      }|@getchar(wkln1,22,17)
  285.                     |@getchar(wkln1,39,80))
  286.                 });
  287.                 });
  288.             });
  289.             footnote(@getchar(@head(wkln1,{\n}),1,69));
  290.             im(wkln1<>{})
  291.             });
  292.         },{No},{
  293.             loop({
  294.             %wkln1 @fread(6,{/});
  295.             case(@getchar(wkln1,1,5)>=First,
  296.             {Yes},{
  297.                 item:=@ftell;
  298.                 %wkln2 @fread;
  299.                 case(85<@getchar(wkln2,8,2) && 
  300.                         @getchar(wkln2,19,1)={:},
  301.                 {Yes},{
  302.                 count:=count+1;
  303.                 case(@getchar(wkln2,29,2),
  304.                 {へ},{
  305.                     madd(2,item|{ }|@getchar(wkln1,1,5)|{ }
  306.                     |@getchar(wkln2,24,5)
  307.                     |@getchar(wkln1,22,17)
  308.                     |@getchar(wkln1,39,80))
  309.                 },,{
  310.                     madd(2,item|{ }|@getchar(wkln1,1,5)
  311.                     |{      }|@getchar(wkln1,22,17)
  312.                     |@getchar(wkln1,39,80))
  313.                 });
  314.                 footnote(@getchar(@head(wkln1,{\n}),1,69));
  315.                 im({No});
  316.                 },{No},{
  317.                 im(wkln1<>{});
  318.                 });
  319.             },{No},{
  320.                 footnote({ article skip. number : }
  321.                     |@getchar(wkln1,1,5));
  322.                 im(wkln1<>{});
  323.             });
  324.             });
  325.             loop({
  326.                 %wkln1 @fread(6,{/});
  327.                 item:=@ftell;
  328.                 %wkln2 @fread;
  329.                 case(85<@getchar(wkln2,8,2) && 
  330.                         @getchar(wkln2,19,1)={:},
  331.                 {Yes},{
  332.                 count:=count+1;
  333.                 case(@getchar(wkln2,29,2),
  334.                 {へ},{
  335.                     madd(2,item|{ }|@getchar(wkln1,1,5)|{ }
  336.                     |@getchar(wkln2,24,5)
  337.                     |@getchar(wkln1,22,17)
  338.                     |@getchar(wkln1,39,80))
  339.                 },,{
  340.                     madd(2,item|{ }|@getchar(wkln1,1,5)
  341.                     |{      }|@getchar(wkln1,22,17)
  342.                     |@getchar(wkln1,39,80))
  343.                 });
  344.                 footnote(@getchar(@head(wkln1,{\n}),1,69));
  345.                 });
  346.                 im(wkln1<>{} && (Count>count || Count=0))
  347.             });
  348.             %wkln1 @fread(6,{/});
  349.         });
  350.     });
  351. });
  352. madd(2,@ftell | { -----------------}|
  353.           {------------------\n});
  354. fclose;
  355. setstar({Yes});
  356. %member @body(fname,,{\})|{\MEMBER.TXT};
  357. case( (type={Forum} || type={Mail}) && @filechk(member),
  358.     {Yes}, {mread(member,3); memnum:=@nolmemo(3);
  359.     },{No},{mkdir(logd,@body(fname,{:},{\}));
  360.         madd(3,{});
  361. });
  362. mset(3,{r});
  363.